<%@ page import="News.service.UserServer" %>
<%@ page import="java.util.List" %>
<%@ page import="News.entity.News" %>
<%@ page import="News.entity.User" %><%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2021/11/29 0029
  Time: 16:14
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>index</title>
</head>
<body>
首页
<table style="border: 1px solid red">
    <tr>
        <td>新闻id</td>
        <td>新闻内容</td>
    </tr>
    <%
        UserServer login=new UserServer();
        List<News> list = login.show();
        for(News news:list){
    %>
    <tr>
        <td><%=news.getNewId()%></td>
        <td><%=news.getNewInfo()%></td>
    </tr>
    <%
        }
    %>
</table>
<form action="Exit.jsp" method="post">
<input type="submit" value="登出">
</form>
</body>
</html>
